import dayjs from "dayjs";

/**
 * 2023-8-13 12:00:00 → 2023-8-13
 * @param row 时间
 * @return {string|string}
 */
export const captureTheDate = (row) => {
  return row === null ? "--" : dayjs(row).format("YYYY-MM-DD");
};

/**
 * 0 → 必做
 * 1 → 选做
 * @param workType 0/1
 * @return {string|string}
 */
export const jobCharacteristics = (workType) => {
  return workType === 0 ? "必做" : "选做";
};